package branch_and_price;

public class Configure {
    private long start_up;
    private long time_limit;

    public Configure() {
        start_up = System.nanoTime();
        time_limit = 7200;
    }

    // 程序开始至今花费的时间
    public long get_time() {
        long current = System.nanoTime();
        return (current - start_up) / 1000000000;
    }

    // 判断是否超出时间限制
    public boolean time_out() {
        long ct = get_time();
        if (ct > time_limit) {
            return true;
        } else {
            return false;
        }
    }
}